const mongoose = require("mongoose");
// 收藏表
module.exports = mongoose.model("collect", {
  user_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'user',
    required: true
  },
  // 	菜谱id
  recipe_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'recipe',
  },
  // 	works_id   作品id      这两个id只能存在一个
  works_id: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: 'works',
  },

  // 收藏夹
  collect_name: {
    type: String,
    default: '无分类'
  }
});
